package com.nmsl.controller;

import com.nmsl.domain.GyfDepartments;
import com.nmsl.mapper.GyfDepartmentsMapper;
import com.nmsl.util.R.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/gyfdepartment")
@RestController
public class gyf_DepartmentsController {
    @Autowired
    private GyfDepartmentsMapper gyfDepartmentsMapper;
    @RequestMapping("/selectByid")
    public R selectByid(int id){
        GyfDepartments gyfDepartments = gyfDepartmentsMapper.GyfselectByPrimaryKey(id);
        if(gyfDepartments!=null){
            return R.ok(gyfDepartments);
        }
        else{
            return R.fail("没有找到信息");
        }
    }
}
